﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Zor_DAL;
using Zor_Tools;

namespace Zor_Bll
{
    public class Preview_Bll<T> where T : class
    {
       /// <summary>
       /// 获取预览总表信息
       /// </summary>
       /// <param name="index"></param>
       /// <param name="TotalCount"></param>
       /// <param name="where"></param>
       /// <returns></returns>
        public static List<T> GetPageList(int index, out int TotalCount, string where)
        {
            int Dtid = RequestSession.GetSessionUser().DT_Id;
            where = "DT_Id = " + Dtid + "";
            return PagerHelp<T>.GetPagerList(index, "V_Preview", "Bd_Id", out TotalCount, where);
        }

       /// <summary>
       /// 获取详细信息
       /// </summary>
       /// <param name="Bd_id"></param>
       /// <returns></returns>
        public static List<T> DetailInfo(int Bd_id)
        {
            return Preview_DAL<T>.DetailInfo(Bd_id);
        }
        
        /// <summary>
        /// 获取导出的数据
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        public static List<T> GetList(string where)
        {
            return Preview_DAL<T>.SelectDetailInfo(where);

        }
    }
}
